/*    */ package com.zimbra.cs.redolog.op;
/*    */ 
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.MailboxManager;
/*    */ import com.zimbra.cs.mailbox.MailboxOperation;
/*    */ import com.zimbra.cs.redolog.RedoLogInput;
/*    */ import com.zimbra.cs.redolog.RedoLogOutput;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class EnableSharedReminder
/*    */   extends RedoableOp
/*    */ {
/*    */   private int mountpointId;
/*    */   private boolean enabled;
/*    */   
/*    */   public EnableSharedReminder()
/*    */   {
/* 33 */     super(MailboxOperation.EnableSharedReminder);
/* 34 */     this.mountpointId = 0;
/* 35 */     this.enabled = false;
/*    */   }
/*    */   
/*    */   public EnableSharedReminder(int mailboxId, int mountpointId, boolean enabled) {
/* 39 */     this();
/* 40 */     setMailboxId(mailboxId);
/* 41 */     this.mountpointId = mountpointId;
/* 42 */     this.enabled = enabled;
/*    */   }
/*    */   
/*    */   protected String getPrintableData() {
/* 46 */     StringBuilder sb = new StringBuilder("mountpoint=").append(this.mountpointId);
/* 47 */     sb.append(", reminderEnabled=").append(this.enabled);
/* 48 */     return sb.toString();
/*    */   }
/*    */   
/*    */   protected void serializeData(RedoLogOutput out) throws IOException {
/* 52 */     out.writeInt(this.mountpointId);
/* 53 */     out.writeBoolean(this.enabled);
/*    */   }
/*    */   
/*    */   protected void deserializeData(RedoLogInput in) throws IOException {
/* 57 */     this.mountpointId = in.readInt();
/* 58 */     this.enabled = in.readBoolean();
/*    */   }
/*    */   
/*    */   public void redo() throws Exception
/*    */   {
/* 63 */     Mailbox mbox = MailboxManager.getInstance().getMailboxById(getMailboxId());
/* 64 */     mbox.enableSharedReminder(getOperationContext(), this.mountpointId, this.enabled);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/redolog/op/EnableSharedReminder.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */